import http from '@/utils/request.js'

// 标签相关API
const tagApi = {
  // 查询全部标签
  getLabelList: () => {
    return http.get('/label/get-all')
  },

  // 查询展示的标签
  getLabelListShow: () => {
    return http.get('/label/get-shown')
  },

  // 添加标签
  addLabel: (data) => {
    return http.post('/label/create', data)
  },

  // 更新标签
  updateLabel: (data) => {
    return http.post('/label/update', data)
  },

  // 展示标签
  showLabel: (data) => {
    return http.get('/label/add-show', data)
  },

  // 取消展示标签
  hideLabel: (data) => {
    return http.post('/label/update-show-sort', data)
  },

  // 删除标签
  deleteLabel: (data) => {
    return http.get(`/label/remove`, data)
  }
}

export default tagApi 